<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Blog Home - Start your blog</title>

    <!-- Bootstrap Core CSS -->
    <link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="{{ url_for('static', filename='css/blog-home.css') }}" rel="stylesheet">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>

<body>

<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
    <div class="container">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse"
                    data-target="#bs-example-navbar-collapse-1">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="{{url_for('blog.index')}}">Home</a>
        </div>
        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                {% if current_user.is_authenticated %}
                <li>
                    <a href="{{url_for('blog.user', username=g.user.username)}}">Articles</a>
                </li>
                <li>
                    <a href="{{url_for('blog.post_form', id=0)}}">Add Article</a>
                </li>
                <li>
                    <a href="{{url_for('blog.logout')}}">Logout</a>
                </li>
                <li>
                    <a href="{{url_for('blog.profile', username=current_user.username)}}">AboutMe</a>
                </li>
                {% if current_user.can(Permission.ADMINISTER) %}
                <li>
                    <a href="/admin">Admin</a>
                </li>
                {% endif %}
                {% else %}
                <li>
                    <a href="{{url_for('blog.login')}}">Login</a>
                </li>
                <li>
                    <a href="{{url_for('blog.signup')}}">Sign up</a>
                </li>
                {% endif %}
            </ul>
        </div>
        <!-- /.navbar-collapse -->
    </div>
    <!-- /.container -->
</nav>
{%- block content %}{%- endblock %}
<!-- Footer -->
<footer>
    <div class="row">
        <div class="col-lg-12">
            <p>Copyright &copy; Life is short, love python</p>
        </div>
        <!-- /.col-lg-12 -->
    </div>
    <!-- /.row -->
</footer>

</div>
<!-- /.container -->

<!-- jQuery -->
<script src="{{ url_for('static', filename='js/jquery.js') }} "></script>

<!-- Bootstrap Core JavaScript -->
<script src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script>

<script src="{{ url_for('static', filename='js/moment.js') }}"></script>

</body>

</html>


